import request from '@/utils/request'

/* 反馈接口 */

// 分页
export function getFeedbackPage(data) {
  return request({
    url: '/comment/page',
    method: 'post',
    data
  })
}

// 删除
export function deleteFeedBackById(id) {
  return request({
    url: `/comment/${id}`,
    method: 'delete'
  })
}

// 新增
export function addFeedback(data) {
  return request({
    url: '/comment',
    method: 'post',
    data
  })
}

// 详情
export function getFeedbackDetailById(id) {
  return request({
    url: `/comment/${id}`,
    method: 'post'
  })
}

// 修改
export function updateFeedback(data) {
  return request({
    url: '/comment',
    method: 'put',
    data
  })
}

// 在一条反馈下追加回复
export function addFeedBackDetail(data) {
  return request({
    url: '/comment-detail',
    method: 'post',
    data
  })
}
